<!DOCTYPE html>  
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta charset="UTF-8" />
    <title></title>
    <script th:src="@{js/jquery.min.js}" type="text/javascript" ></script>
    <script>
    	$(function(){
    		alert("aaaa");
    	})
    	function save(){
    		$.ajax(
    				"/saveuserinfo"
    				//"/home"
                    , {
                          async: true
    			        , cache: false
                        , dataType: "json"
    			        , data: { 
    			        		  "name": "222"
    	            			, "pwd": "222"
    	                		}
    			        , type: "POST"
    			        , processData: true
    			        , success: function (data, textStatus, jqXHR) {
    			            if (textStatus == "success") {
    			            		alert(data.message);
    			            }
    			        }
    			        

                    }
        	);
    	}
    </script>
</head>
<body>
<h1 th:text="${host}">Hello World</h1>
<input type="button" value="确定" onclick="save()"/>
</body>
</html>